To meet a higher-level information need of a user, network operators provide the user with various services, such as an antivirus service, a firewall service, an application cache and acceleration service, a web (web) optimization service, and a NAT (Network Address Translation, network address translation) service. When user equipment sends an uplink service flow to a network server, the user equipment sends the uplink service flow to service devices on an uplink service path, and the service devices on the uplink service path perform service processing on the uplink service flow and send a processed uplink service flow to the network server. Likewise, when the network server sends a downlink service flow to the user equipment, the network server sends the downlink service flow to service devices on a downlink service path, and the service devices on the downlink service path perform service processing on the downlink service flow and send a processed downlink service flow to the user equipment. Therefore, before the uplink service flow is transmitted, a classifier needs to generate an uplink service path, and the uplink service flow is transmitted according to the uplink service path. Before the downlink service flow is transmitted, the classifier needs to generate a downlink service path, and the downlink service flow is transmitted according to the downlink service path. The classifier is a device that identifies and classifies a service flow and that generates a service path according to the service flow. For example, the classifier may be a PCEF (Policy and Charging Enforcement Function), a PGW (Packet Gateway), or the like.
The prior art provides a service path generation method. The service path generation method may be as follows: A classifier receives an uplink service flow sent by user equipment, where the uplink service flow includes at least a user equipment identifier; obtains subscription information of a user from a correspondence between the user equipment identifier and the subscription information of the user equipment according to the user equipment identifier; and obtains uplink service types according to the subscription information of the user. To share load, multiple service devices may be deployed for each service type. Therefore, when obtaining the uplink service types, the classifier separately and randomly selects a service device from the service devices corresponding to each uplink service type, and forms an uplink service path according to the selected service devices. Likewise, when a downlink service flow is received, a downlink service path is generated according to the foregoing method.
In a process of implementing the present invention, the inventor finds that the prior art has at least the following problem:
After the uplink service path is generated, a service device included in the uplink service path establishes a TCP (Transmission Control Protocol) connection to a network server, and transmits the uplink service flow to the network server by using the TCP connection. However, for a same service type, a service device included in the downlink service path may be different from a service device included in the uplink service path. As a result, the service device included in the downlink service path does not establish a TCP connection to the network server. Therefore, the downlink service flow cannot be transmitted, thereby causing transmission interruption of the downlink service flow.